import request from '@/utils/request'

enum Api {
  updateArea = '/area/update', // 根据ID更新排水户信息
  selectAreaByRecordId = '/area/selectAreaByRecordId', // 根据档案ID查询区域信息
  insertArea = '/area/insert', // 插入区域信息
  deleteArea = '/area/delete', // 根据ID删除区域信息
}

export const updateArea = (data?: object) => request.post(Api.updateArea, data)

export function selectAreaByRecordId(params?: object) {
  return request.get(Api.selectAreaByRecordId, params)
}

export const deleteArea = (data?: object) => request.get(`${Api.deleteArea}?id=${data}`)

export const insertArea = (data?: object) => request.post(Api.insertArea, data)
